import { View, Text } from "@tarojs/components";
import { useLoad } from "@tarojs/taro";
import { useState } from "react";
import { AtCard } from "taro-ui";
export default function Index() {
  useLoad(() => {
    console.log("Page loaded.");
  });

  let [list, setList] = useState([
    {
      id: 1,
      Community: "振涛小区",
      room: "1栋1单元101",
      name: "林夕",
      state: 0,
    },
    {
      id: 1,
      Community: "振涛小区",
      room: "1栋1单元102",
      name: "林夕",
      state: 0,
    },
    {
      id: 1,
      Community: "振涛小区",
      room: "1栋1单元103",
      name: "林夕",
      state: 0,
    },
    {
      id: 1,
      Community: "振涛小区",
      room: "1栋1单元104",
      name: "林夕",
      state: 0,
    },
  ]);

  return (
    <View>
      {list.map((item) => {
        return (
          <AtCard
            key={item.id}
            note="小Tips"
            extra="额外信息"
            title="这是个标题"
            thumb="http://www.logoquan.com/upload/list/20180421/logoquan15259400209.PNG"
          >
            这也是内容区 可以随意定义功能
          </AtCard>
        );
      })}
    </View>
  );
}
